package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the SENDGOODSFORM database table.
 * 
 */
@Entity
@NamedQuery(name="Sendgoodsform.findAll", query="SELECT s FROM Sendgoodsform s")
public class Sendgoodsform implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="SENDGOODSFORM_SGFID_GENERATOR", sequenceName="SEQ_45")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="SENDGOODSFORM_SGFID_GENERATOR")
	@Column(name="SGF_ID")
	private long sgfId;

	@Column(name="SGF_CO_ID")
	private BigDecimal sgfCoId;

	@Column(name="SGF_CO_THEME")
	private String sgfCoTheme;

	@Column(name="SGF_CUS_ID")
	private BigDecimal sgfCusId;

	@Column(name="SGF_CUS_NAME")
	private String sgfCusName;

	@Column(name="SGF_FARE")
	private BigDecimal sgfFare;

	@Column(name="SGF_SEND_MAN")
	private String sgfSendMan;

	@Temporal(TemporalType.DATE)
	@Column(name="SGF_TIME")
	private Date sgfTime;

	@Column(name="SGF_WAY")
	private String sgfWay;

	//bi-directional many-to-one association to ConstactOrder
	@OneToMany(mappedBy="sendgoodsform")
	private List<ConstactOrder> constactOrders;

	//bi-directional many-to-one association to ConstactOrder
	@ManyToOne
	@JoinColumn(name="CO_ID")
	private ConstactOrder constactOrder;

	//bi-directional many-to-one association to Customerinfo
	@ManyToOne
	@JoinColumn(name="CUST_ID")
	private Customerinfo customerinfo;

	public Sendgoodsform() {
	}

	public long getSgfId() {
		return this.sgfId;
	}

	public void setSgfId(long sgfId) {
		this.sgfId = sgfId;
	}

	public BigDecimal getSgfCoId() {
		return this.sgfCoId;
	}

	public void setSgfCoId(BigDecimal sgfCoId) {
		this.sgfCoId = sgfCoId;
	}

	public String getSgfCoTheme() {
		return this.sgfCoTheme;
	}

	public void setSgfCoTheme(String sgfCoTheme) {
		this.sgfCoTheme = sgfCoTheme;
	}

	public BigDecimal getSgfCusId() {
		return this.sgfCusId;
	}

	public void setSgfCusId(BigDecimal sgfCusId) {
		this.sgfCusId = sgfCusId;
	}

	public String getSgfCusName() {
		return this.sgfCusName;
	}

	public void setSgfCusName(String sgfCusName) {
		this.sgfCusName = sgfCusName;
	}

	public BigDecimal getSgfFare() {
		return this.sgfFare;
	}

	public void setSgfFare(BigDecimal sgfFare) {
		this.sgfFare = sgfFare;
	}

	public String getSgfSendMan() {
		return this.sgfSendMan;
	}

	public void setSgfSendMan(String sgfSendMan) {
		this.sgfSendMan = sgfSendMan;
	}

	public Date getSgfTime() {
		return this.sgfTime;
	}

	public void setSgfTime(Date sgfTime) {
		this.sgfTime = sgfTime;
	}

	public String getSgfWay() {
		return this.sgfWay;
	}

	public void setSgfWay(String sgfWay) {
		this.sgfWay = sgfWay;
	}

	public List<ConstactOrder> getConstactOrders() {
		return this.constactOrders;
	}

	public void setConstactOrders(List<ConstactOrder> constactOrders) {
		this.constactOrders = constactOrders;
	}

	public ConstactOrder addConstactOrder(ConstactOrder constactOrder) {
		getConstactOrders().add(constactOrder);
		constactOrder.setSendgoodsform(this);

		return constactOrder;
	}

	public ConstactOrder removeConstactOrder(ConstactOrder constactOrder) {
		getConstactOrders().remove(constactOrder);
		constactOrder.setSendgoodsform(null);

		return constactOrder;
	}

	public ConstactOrder getConstactOrder() {
		return this.constactOrder;
	}

	public void setConstactOrder(ConstactOrder constactOrder) {
		this.constactOrder = constactOrder;
	}

	public Customerinfo getCustomerinfo() {
		return this.customerinfo;
	}

	public void setCustomerinfo(Customerinfo customerinfo) {
		this.customerinfo = customerinfo;
	}

}